package com.example.demo.connerlt;


import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableAsync
public class test1 {
    @Scheduled(fixedDelayString = "2000")
    public void run() throws JSONException {
        JSONObject test1 = new JSONObject();
        //添加
        test1.put("name", "张三");
        test1.put("age", 18.4);
        test1.put("birthday", "1900-20-03");
        test1.put("majar", new String[]{"哈哈", "嘿嘿"});
        test1.put("null", null);
        test1.put("house", false);
        System.out.println(test1.toString());

    }
}
